<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  var data = {
    something: {
      str: 'xxxxxx'
    }
  };

  function change(some) {
    some.str = 'ffff';
    console.log(data.something, some)
  }

  function changeString(str) {
    str = 'vvv';
    console.log(data.something, str)
  }
  console.log(data.something)
  change(data.something);
  changeString(data.something.str);

</script>
监听
</body>
</html>